//
// Created by lenovo on 2017/4/23.
//

#include "Token.h"

Token::Token(Tag t) {
    tag = t;
}

string Token::toString() {
    switch (tag) {
        case ERR:
            return "Error";
        case EQU:
            return "[EQU(=)]";
        case SEMICON:
            return "[SEMICON(;)]";
        case SPACE:
            return "[SPACE]";
        case EOL:
            return "[EOL(\\n)]";
        case ADD:
            return "[ADD(+)]";
        case ENDF:
            return "[EOF]";
        default:
            return "[udf]";
    }
}
